package cn.sxt.service;

import cn.sxt.entities.CommonResult;
import cn.sxt.entities.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 通过eureka去找
 * @author Mxb
 * @version 1.0
 * @date 2020/4/28 11:44
 */
@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
public interface PaymentFeignService {
    //CommonResult<Payment> findPaymentById(@Param("id") Long id);

    @GetMapping(value = "/payment/find/{id}")
    public CommonResult<Payment> findPaymentById(@PathVariable("id") Long id);


    @GetMapping(value = "payment/feign/timeout")
    public String paymentFeignTimeout();
}
